import java.util.Scanner;

/**
 * Created by IntelliJ IDEA.
 * User: zm
 * Date: 2023/3/12
 */
public class Demo2 {
    //判断是否是素数
    public static boolean isPrimeNumber(int nums){
        for(int i = 2; i <= Math.pow(nums,0.5); i++){
            if(nums % i == 0)return false;
        }
        return true;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        int n = 0; int i = 2;
        while(true){
            if(isPrimeNumber(i)){
                n++;
            }
            if(n == 100002)break;
            i++;
        }
        System.out.print(i);
        scan.close();
    }
}
